package org.example.study6;

public class SingletonDCLTest {
    public static void main(String[] args) {
        // 创建10个线程
        for (int i = 0; i < 10; i++) {
            Thread thread = new Thread(() -> {
                // 获取单例对象
                SingletonDCL instance = SingletonDCL.getInstance();
                // 打印结象结果
                System.out.println(instance);
            });
            // 启动线程
            thread.start();
        }
    }
}
